<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>GIANT管理平台</title>
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport"
	content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href="./lib/layui-v2.5.5/css/layui.css"
	media="all">
<link rel="stylesheet" href="./css/public.css" media="all">
</head>
<body>
	<form class="layui-form" id="forms">
		<div class="layui-form-item">
			<label class="layui-form-label"></label>
			<div class="layui-input-inline" style="width: 350px;">
				<input type="text" id="scartID" name="scartID" required=""
					autocomplete="off" class="layui-input" style="display: none">
			</div>
		</div>
		

		
		<div class="layui-form-item">
			<label class="layui-form-label">数量:</label>
			<div class="layui-input-inline" style="width: 350px;">
				<input type="text" id="quantity" name="quantity" required=""
					autocomplete="off" class="layui-input">
			</div>
		</div>
		
	
		
		

		<div class="layui-btn-container" style="text-align: center;">
			<input type="submit" class="layui-btn" lay-filter="userEditBtu"
				id="sub" value="修改" />
		</div>
	</form>
	<script type="text/javascript" src="./layui/layui.js"></script>
	<script>
		//加载了layui的form模块
		layui.use('form', function() {
			var form = layui.form;
			var $ = layui.jquery; //引入jquery
			//监听提交
			$("#sub").click(function(){
				var data=$("#forms").serialize();
				var url = '/wk1un10//houtai/ShoppingcartUpdate';
				//确保数据没有问题就进行ajax提交了
				$.post(url, data, function(data) {
					if (data.count > 0) {
						console.log('修改成功');
						var index = parent.layer.getFrameIndex(window.name); //获取当前窗口的name
						parent.layer.close(index); //关闭窗口
					}
				}, "json");
				return false;
			});
		
		});
	</script>

</body>
</html>